import type { User, UserList } from "@/types/user";
import { request } from "@/utils/request";

// 查询所有用户列表
export const all = (loginName?: string) => request<UserList>("/user/all", "GET", { loginName });
// 编辑/新增
export const save = (user: User) => request("/user/save", "POST", user);
// 根据id删除
export const del = (id: number) => request(`/user/del/${id}`, "DELETE");
